package com.mz.mattress.api.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * 订单状态
 * 状态 1离线 2在线 3使用中 4已停止 5已结束
 */
public enum UseOrderStatusEnum {

//    OFF_LONE(1, "离线"),
//    ON_LINE(2, "在线"),

    INIT(0, "初始"),
    DOING(1, "使用中"),
    PAUSE(2, "已暂停"),
    DONE(3, "已结束"),
    ;

    private Integer value;

    private String desc;

    UseOrderStatusEnum(final Integer value, final String desc) {
        this.value = value;
        this.desc = desc;
    }

    private static Map<Integer, UseOrderStatusEnum> map = new HashMap<>();

    static {
        for (UseOrderStatusEnum stepEnum : UseOrderStatusEnum.values()) {
            map.put(stepEnum.value, stepEnum);
        }
    }

    public static UseOrderStatusEnum valueOf(int value) {
        return map.get(value);
    }

    public Integer getValue() {
        return this.value;
    }

    public String getDesc() {
        return this.desc;
    }
}
